﻿using System;
using System.Collections.Generic;
using System.Text;
using LibraryONTrack.Common;

namespace LibraryONTrack.dto
{
	public class OverdueBook: DTOBase
	{
		public Student Borrower { get; set; }
		public Teacher Teacher { get; set; }
		public Book Book { get; set; }
		public int NoticeCount { get; set; }
		public Boolean StillOverdue { get; set; }
		public DateTime LastNoticeSentDateTime{ get; set; }
				
		public OverdueBook()
		{
			Borrower = null;
			Teacher = null;
			Book = null;
			StillOverdue = true;
			NoticeCount = NullValues.NullInt;
			LastNoticeSentDateTime = NullValues.NullDateTime;
		}

		public OverdueBook(Book book, Student borrower, Teacher teacher, int noticeCount=0) : this()
		{
			this.Book = book;
			this.Borrower = borrower;
			Teacher = teacher;
			NoticeCount = noticeCount;
		}

		public override string ToString()
		{
			return String.Format("[OverdueBook: Student={0}; Teacher={1}]; Book={2}; NoticeCount={3}", this.Borrower, this.Teacher, this.Book, this.NoticeCount);
		}		
	}
}
